package com.example.progresshint;

import io.techery.progresshint.addition.ViewUtil;

import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

/**
 * ExampleOhosTest
 *
 * @since : 2021.07.28
 */
public class ExampleOhosTest {
    /**
     * test bundleName
     */
    @Test
    public void testBundleName() {
        final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
        assertEquals("com.example.progresshint", actualBundleName);
    }

    /**
     * test getDisplayWidthInPx
     */
    @Test
    public void testGetDisplayWidthInPx() {
        final int screenWidth = ViewUtil.getDisplayWidthInPx();
        assertNotEquals(0, screenWidth);
    }

    /**
     * test getDisplayHeightInPx
     */
    @Test
    public void testGetDisplayHeightInPx() {
        final int screenHeight = ViewUtil.getDisplayHeightInPx();
        assertNotEquals(0, screenHeight);
    }
}